import { ConfigProvider } from 'antd';
import zhCN from 'antd/es/locale/zh_CN';
import router from './router';
import { RouterProvider } from 'react-router-dom';
import { useEffect } from 'react';
import { useThemeStore } from '@/utils/theme';

function App() {
  const theme = useThemeStore();
  useEffect(() => {
    theme.setThemeName('purple');
  });
  return (
    <>
      <ConfigProvider locale={zhCN} theme={theme.themeConfig}>
        <RouterProvider router={router} />
      </ConfigProvider>
    </>
  );
}

export default App;
